<{lang_script src="lang.js" app="site"}>
<{css src="framework.css" app="site" pdir="css_mini"}>
<{css src="b2c.css" app="b2c" pdir="css_mini"}>
<{css src="passport.css" app="b2c" pdir="css_mini"}>
<{if defined("DEBUG_JS") && DEBUG_JS}>
  <{script src="mootools.js" app="site"}>
  <{script src="formplus.js" app="site"}>
  <{script src="jstools.js" app="site"}>
  <{script src="shoptools.js" app="b2c"}>
  <{script src="coms/popup.js" app="site"}>
<{else}>
  <{script src="moo_min.js" app="site" pdir="js_mini"}>
  <{script src="tools_min.js" app="site" pdir="js_mini"}>
  <{script src="shoptools_min.js" app="b2c" pdir="js_mini"}>
  <{script src="ui_min.js" app="site" pdir="js_mini"}>
<{/if}>
<{lang_script src="lang.js" app="b2c"}>
<{lang_css src="lang.css" app="b2c"}>
<{if count($data)>0}>
<form id="use" action="#"  method="POST">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
	  <th><{t}>选择<{/t}></th>
	  <td><{t}>品牌名称<{/t}></a></td>
	</tr>
	<{foreach from=$data item=data key=key}>
	<tr>
	  <th><{input type="checkbox" name=$data.brand_id style="width:120px"}></th>
	  <td><a href="javascript:void(0);"><{$data.brand_name}></a></td>
	</tr>
    <{/foreach}>
	</table>
	<div style="align:center;">
		<{button type="button"  label=$___b2c="申请"|t:'b2c'}>
	</div>
</form>

<script>
	$('use').getElement('button').addEvent('click',function(){
           if(validate($('brand'))){
                new Request.JSON({
                    url:"<{link app=business ctl=site_brand act=applyStatus}>",
                    method:'post',
                    data:$('use'),
                    onComplete:function(res){
							if(res.status=='success'){
								Ex_Dialog.alert(res.message);
							}else{
								Ex_Dialog.alert(res.message);
							}
							 top.location.reload();
                           
                        
                    }
                }).send();
            }

   });


</script>
<{else}>
暂无可申请使用的品牌！
<{/if}>